package com.lyfei.yd.common.exception;

import lombok.Getter;

public class CustomException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    @Getter
    private Integer code = 9999;

    private final String message;

    public CustomException(String message) {
        this.message = message;
    }

    public CustomException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }

    public CustomException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
